<template>
  <div class="common-layout">
    <el-container>
      <el-container>
        <el-aside width="200px" class="aside-menu beautify-aside">
          <el-scrollbar>
            <el-menu
              :default-active="activeMenu"
              class="el-menu-vertical-demo beautify-menu"
              router
              unique-opened
              :collapse="false"
            >
              <el-divider class="divider divider-gap" />
              <el-menu-item index="stafflist">
                <el-icon><i-ep-refresh /></el-icon>
                <span>人事管理</span>
              </el-menu-item>
            </el-menu>
          </el-scrollbar>
        </el-aside>
        <el-main class="aside-main-bg">
        <RouterView/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script setup lang="ts">
import { ref } from 'vue'

import {
  Folder as IEpFolder,
  CirclePlus as IEpCirclePlus,
  Menu as IEpMenu,
  Position as IEpPosition,
  Search as IEpSearch,
  Flag as IEpFlag,
  Goods as IEpGoods,
  Refresh as IEpRefresh
} from '@element-plus/icons-vue'

const activeMenu = ref('1-1-2') // 供应商列表高亮

</script>

<style scoped>
.common-layout {
  height: 100vh;
  background: #f5f7fa;
}
.aside-header {
  background: transparent;
  box-shadow: none;
  padding: 0;
  height: auto;
}
.beautify-user-panel {
  display: flex;
  align-items: center;
  padding: 22px 0 18px 18px;
  background:#409eff;
  border-radius: 10px;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.03);
  margin: 12px 10px 0 10px;
}
.user-avatar {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px;
  min-height: 54px;
  box-shadow: 0 2px 8px 0 rgba(64,158,255,0.15);
}
.user-meta {
  margin-left: 2000px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  
}
.user-name {
  
  font-weight: 700;
  color: #222;
  font-size: 17px;
  margin-bottom: 2px;
}
.user-dept, .user-role {
  font-size: 13px;
  color: #fff;
  font-weight: 400;
  margin-bottom: 1px;
}
.beautify-aside {
  background: #fff;
  box-shadow: 2px 0 8px 0 rgba(0,0,0,0.04);
  border-right: 1px solid #e4e7ed;
  padding: 0;
  min-height: 100vh;
}
.aside-main-bg {
  background: #f5f7fa;
  min-height: 100vh;
  padding: 0;
}
.divider {
  margin: 10px 0 10px 0;
  border-color: #f0f0f0;
}
.divider-gap {
  margin: 18px 0 10px 0;
}
.el-menu-vertical-demo.beautify-menu {
  background: transparent;
  border-right: none;
  font-size: 15px;
  padding-bottom: 20px;
}
.el-menu-vertical-demo.beautify-menu .el-menu-item {
  border-radius: 8px;
  margin: 2px 8px;
  padding-left: 18px !important;
  transition: background 0.2s, color 0.2s;
  height: 42px;
  line-height: 42px;
  font-size: 15px;
  display: flex;
  align-items: center;
}
.el-menu-vertical-demo.beautify-menu .el-menu-item .el-icon {
  margin-right: 10px;
  font-size: 18px;
}
.el-menu-vertical-demo.beautify-menu .el-menu-item.is-active {
  background: linear-gradient(90deg, #e6f0fe 80%, #fff 100%) !important;
  color: #409eff !important;
  font-weight: 600;
  position: relative;
}
.el-menu-vertical-demo.beautify-menu .el-menu-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 4px;
  height: 28px;
  background: #409eff;
  border-radius: 3px;
}
.el-menu-vertical-demo.beautify-menu .el-menu-item:hover {
  background: #f2f8ff !important;
  color: #409eff;
}
.el-menu-vertical-demo.beautify-menu .el-sub-menu__title {
  font-weight: 500;
  color: #333;
  padding-left: 10px !important;
  height: 40px;
  line-height: 40px;
  border-radius: 8px;
  margin: 2px 8px;
  transition: background 0.2s, color 0.2s;
}
.el-menu-vertical-demo.beautify-menu .el-sub-menu__title .el-icon {
  margin-right: 10px;
  font-size: 18px;
}
.el-menu-vertical-demo.beautify-menu .el-sub-menu__title:hover {
  background: #f2f8ff !important;
  color: #409eff;
}
.el-menu-vertical-demo.beautify-menu .el-menu--inline {
  background: transparent !important;
}
.el-menu-vertical-demo.beautify-menu .el-menu--inline .el-menu-item {
  padding-left: 36px !important;
  font-size: 14px;
}
.el-menu-vertical-demo.beautify-menu .el-menu--inline .el-menu--inline .el-menu-item {
  padding-left: 54px !important;
  font-size: 13px;
}
.el-menu-vertical-demo.beautify-menu .el-menu--inline .el-sub-menu__title {
  padding-left: 28px !important;
  font-size: 14px;
}
.el-menu-vertical-demo.beautify-menu .el-menu--inline .el-menu--inline .el-sub-menu__title {
  padding-left: 46px !important;
  font-size: 13px;
}
</style>